package com.boolib;

import java.lang.reflect.Proxy;

public class Test {
    public static void main(String[] args) {

        HelloService helloService1 = new HelloServiceImpl();
        HelloService helloService = (HelloService) Proxy.newProxyInstance(
                Test.class.getClassLoader(),
                new Class[]{HelloService.class},
                new com.boolib.Proxy(helloService1));

        helloService.sayHi("aaa");
    }

}
